package com.iwhale.cxm.mail.controller;

import com.iwhale.cxm.mail.service.DubboInvokeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author wang.jianwen
 * @version 1.0
 * @CreateDate 2019/7/16
 * @Desc
 */
@RestController
@RequestMapping("/rwscxm/api/v1/dubbo")
public class DubboController {

  private static final Logger logger = LoggerFactory.getLogger(DubboController.class);

  @Autowired
  private DubboInvokeService dubboInvokeServiceb;

  @CrossOrigin
  @PostMapping("/invoke")
  public Object invoke(@RequestBody DubboInvoke dubboInvoke) throws Exception {
    return dubboInvokeServiceb.invoke(dubboInvoke);
  }



}
